package cn.nfwx.tv.down.execute;

import android.support.annotation.NonNull;

import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.FutureTask;

public class DownProgramFutureTask extends FutureTask<Integer> {
    public DownProgramFutureTask(Callable<Integer> callable) {
        super(callable);
    }

    public DownProgramFutureTask(Runnable runnable, Integer result) {
        super(runnable, result);
    }

    @Override
    protected void done() {

        try {
            System.out.println("future.done():" + get());
        } catch (InterruptedException e) {
            e.printStackTrace();
        } catch (ExecutionException e) {
            e.printStackTrace();
        }
    }
}
